A device for bi-directional audio-based communication typically includes both a loudspeaker and a microphone. The loudspeaker is used to play back audio signals received from a remote (“far-end”) source, while the microphone is used to capture audio signals from a local (“near-end”) source. In the case of a telephone call, for example, the near- and far-end sources may be people engaged in a conversation, and the audio signals may contain speech. An acoustic echo occurs when the far-end signal emitted by the loudspeaker is captured by the microphone, after undergoing reflections in the local environment.
An acoustic echo canceller (AEC) may be used to remove acoustic echo from an audio signal captured by a microphone, in order to facilitate improved communication. The AEC typically filters the microphone signal by determining an estimate of the acoustic echo, and subtracting the estimate from the microphone signal to produce an approximation of the true near-end signal. The estimate is obtained by applying a transformation to the far-end signal emitted from the loudspeaker. The transformation is implemented using an adaptive algorithm such as least mean squares, normalized least mean squares, or their variants, which are known to persons of ordinary skill in the art.
The adaptive transformation relies on a feedback loop, which continuously adjusts a set of coefficients that are used to calculate the estimated echo from the far-end signal. Different environments produce different acoustic echoes from the same loudspeaker signal, and any change in the local environment may change the way that echoes are produced. By using a feedback loop to continuously adjust the coefficients, an AEC can adapt its echo estimates to the local environment in which it operates.
While adaptation generally improves the echo estimates produced by an AEC, this is not always true. The feedback-based adaptation scheme works better in some situations than in others, so it may be beneficial to increase or decrease the rate of adaptation in different situations. An AEC system may therefore include one or more detector modules that monitor relevant signals in order to recognize circumstances in which the rate of adaptation should be adjusted.
One circumstance in which the rate of adaptation may be adjusted is called “double talk.” Double talk occurs when the far-end signal and the near-end signal are both simultaneously active. It is contrasted from “transmit single talk” and “receive single talk.” In the case of receive single talk, the far-end signal is active (e.g., because a person on the far end is talking), and the near-end signal is inactive (e.g., because nobody on the near end is talking). In this situation, the microphone signal will include only the acoustic echo that is produced by sound reflected from the loudspeaker. The acoustic echo can then be cancelled simply by adjusting the adaptive coefficients until they yield an estimated echo that matches the actual echo present in the microphone signal. Thus, in the case of receive single talk, the feedback loop will cause the estimated echo to rapidly converge on the actual echo.
In contrast, when double talk is present, the microphone signal will include both the near-end signal and the acoustic echo. In this situation, the AEC may be unable to adequately distinguish between the different components of the microphone signal. If the feedback loop continues with the same rate of adaptation during double talk, the estimated echo may diverge from the actual echo, and the AEC may no longer provide satisfactory echo cancellation. In order to prevent such divergence, AECs typically rely on double-talk detectors, which may be used to decrease the rate of adaptation or stop it altogether during periods of double talk.
As previously noted, it may be useful to increase the rate of adaptation in some situations rather than decreasing it. For example, when the communication device changes position relative to objects or people in the local environment, the reflections that produce the acoustic echo may change as well. This is referred to as an echo path change. When an echo path change occurs, the estimated echo produced by the AEC may no longer provide a good approximation of the actual acoustic echo. The AEC's adaptive coefficients will eventually be updated by the feedback loop, but until then the quality of the AEC output will be diminished. Therefore, AECs typically rely on echo path change detectors (EPCDs), which may be used to temporarily increase the rate of adaptation.
As described above, an AEC system may include various detector modules that may trigger increases or decreases in the rate of adaptation. Even if an AEC system has only two detectors, it is possible that adjustments triggered by each detector will conflict with one another. For instance, the adaptation strategy normally triggered by an EPCD (increasing the adaptation rate) is incompatible with the strategy that is normally triggered by a double-talk detector (decreasing the adaptation rate). When additional detector modules are incorporated into an AEC system to deal with other signal conditions, the potential for inconsistent strategies increases, along with the potential for poor performance.